#asp.net – asp:QueryStringParameter and empty query string parameter
Explore tagged Tumblr posts
Text
asp.net – asp:QueryStringParameter and empty query string parameter
SqlDataSource wont fire if any of its parameters are null, unless you specify otherwise:<asp:SqlDataSource CancelSelectOnNullParameter=False />
It might also be necessary to add a null default value to your querystring parameter:<asp:QueryStringParameter Name=client QueryStringField=client DefaultValue= ConvertEmptyStringToNull=True />
You need to define a Default value to the parameter for those situations, for example:<asp:QueryStringParameter Name=client QueryStringField=client DefaultValue=0/>
and then in the SP you need verify if the client is 0, return all the clients, otherwise the specific one.
0 notes